package console

import (
	"gin-demo/common"
	"gin-demo/container"
	"gin-demo/dao/console"
	"gin-demo/entity"
)

type ClusterServiceImp struct {
}

func (c ClusterServiceImp) List(pageRequest common.PageRequest) (*entity.ClusterList, error) {

	clusterDao := container.Get("clusterDao").(console.ClusterDao)
	clusterList, err := clusterDao.List(pageRequest)
	if err != nil {
		return nil, err
	}

	return clusterList, nil
}
